package com.tan.androidtest.viewaction;

import android.widget.TextView;

import com.tan.androidtest.R;
import com.tan.androidtest.adapter.NormalAdapter;
import com.tan.androidtest.base.BaseActivity;
import com.tan.androidtest.view.MyListView;

import java.util.ArrayList;
import java.util.List;

/**
 * 测试滑动事件的冲突
 */

public class TestViewActionConflictActivity extends BaseActivity {

    @Override
    public int initLayoutId() {
        return R.layout.activity_test_view_action_conflict_layout;
    }

    @Override
    public void initTitle(TextView tv_bar_left, TextView tv_bar_title, TextView tv_bar_right) {
        tv_bar_title.setText("测试View的滑动事件冲突");
    }

    @Override
    public void initView() {


        List<String> beans = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            beans.add("item: " + i);
        }
        //使用的是RecycleView
        /*RecyclerView lv_test = findViewById(R.id.lv_test);
        lv_test.setLayoutManager(new LinearLayoutManager(this));
        NormalRecycleAdapter adapter = new NormalRecycleAdapter(this);
        lv_test.setAdapter(adapter);
        adapter.loadBeans(beans);*/

        //使用的是MyListView
        MyListView lv_test = findViewById(R.id.lv_test);
        NormalAdapter adapter = new NormalAdapter(this);
        lv_test.setAdapter(adapter);
        adapter.loadBean(beans);

    }

    @Override
    public void initData() {

    }
}
